#region  == Copyright == 
// =====================================================================
//  Microsoft Consulting Services France - Aymeric Mouill� - 2013
//  Projet     : Bulk Security Role Manager - Bulk Security Role Manager
//  Fichier    : UserRoleAssignation.cs (25/04/2013 15:19)
//  
//  Copyright (C) Microsoft Corporation.  All rights reserved.
// =====================================================================
#endregion

namespace CRM.BulkSecurityRoleManager
{
    #region  == Using == 
    using System;
    using System.Diagnostics;

    #endregion

    [DebuggerDisplay("{UserName} : {RoleName}")]
    public class UserRoleAssignation
    {
        #region User Id
        /// <summary>
        /// Gets or sets the user id.
        /// </summary>
        /// <value>
        /// The user id.
        /// </value>
        public Guid UserId { get; set; }
        #endregion

        #region User Name
        /// <summary>
        /// Gets or sets the name of the user.
        /// </summary>
        /// <value>
        /// The name of the user.
        /// </value>
        public string UserName { get; set; }
        #endregion

        #region Role Id
        /// <summary>
        /// Gets or sets the role id.
        /// </summary>
        /// <value>
        /// The role id.
        /// </value>
        public Guid RoleId { get; set; }
        #endregion

        #region Role Name
        /// <summary>
        /// Gets or sets the name of the role.
        /// </summary>
        /// <value>
        /// The name of the role.
        /// </value>
        public string RoleName { get; set; }
        #endregion

        #region Status
        /// <summary>
        /// Gets or sets the status.
        /// </summary>
        /// <value>
        /// The status.
        /// </value>
        public string Status { get; set; }
        #endregion

        #region = Constructor =
        /// <summary>
        /// Initializes a new instance of the <see cref="UserRoleAssignation" /> class.
        /// </summary>
        /// <param name="user">The user.</param>
        /// <param name="role">The role.</param>
        public UserRoleAssignation(User user, Role role)
        {
            UserId = user.UserId;
            UserName = user.UserName;
            RoleId = role.RoleId;
            RoleName = role.RoleName;
        }
        #endregion
    }
}
